package com.majun.base.flux;

import reactor.core.publisher.Flux;

public class FluxOperationsExample {
	public static void main(String[] args) {
		Flux<Integer> flux = Flux.range(1, 10).filter(i -> i % 2 == 0) // 过滤偶数
				.map(i -> i * i) // 映射到平方
				.doOnNext(System.out::println); // 打印每个元素

		// 订阅Mono
		flux.subscribe();
	}
}
